When developing a software application, an individual software engineer often works on a specific feature of the software application. Once the feature is developed and tested, the source code containing the feature may be checked in and committed to the software application's code repository so that the feature can be shared with other software engineers working on the software application. To commit a feature to the code repository, a software engineer checks in all file changes and file additions necessary to make the feature functional on other machines. A commit to the software application's code repository may include only one file or may include a set of modifications made to specific source code files on a software engineer's individual machine that should be added to the code base held in the software application's code repository. Each commit is usually given an identifier. A specific commit, identified by its identifier, may provide a snapshot of a code repository at a given time. Each file within the commit may receive a file revision number that is associated with the commit. Software engineers may pull and accept updates from the code repository in order to obtain the latest commits containing the latest versions of files in the code repository and ensure that they are working on the current versions of source code files of the code base.
Within the software application development process, when viewing code, additional information related to the code may be relevant for understanding the code's purpose, functionality, or for finding a way to modify the code or fix broken code. Integrated development environments (IDEs) or text editors may display this additional information as annotations to the source code. For example, misspelled words may be highlighted, compiler errors may be shown next to the code that produced the errors, and a list of recent changes to a source code file or directory may be shown. Annotations may come from multiple sources, such as static code analysis, production systems, spell checkers, or collaboration tools. The tools that provide annotations operate on one specific file revision or commit. However, the generated annotations may remain relevant across file revisions or repository snapshots as long as subsequent code modifications in later commits do not render the annotations obsolete.
It would be advantageous for generated annotations to be made available across source code file revisions and code commits as long as they are useful for software engineers. As recognized by the inventors, there should be a way to generate and display annotations efficiently and correctly across software code commits in a source code repository.